#include "randomtestcard.h"
/**
 int cardEffect(int card, int choice1, int choice2, int choice3, struct gameState *state, int handPos, int *bonus)
*/
void testOutpost(int handPos, struct gameState* state){
    int turn = whoseTurn(state);
    int currOutpost = state->outpostPlayed;
    state->hand[turn][handPos]=outpost;
    cardEffect(outpost,0,0,0,state,handPos,0);
    if(currOutpost+1 != state->outpostPlayed){
        printf("Number of outpost cards failed to increment\n");
    }
    endTurn(state);
    if( turn != whoseTurn(state)){
        printf("Outpost failed to maintain current player's turn\n");
    }
    else{
        if(state->handCount[turn]!=3){
            printf("Outpost turn not implemented correctly, number of cards in hand is: %i\n",state->handCount[turn]);
        }
    }
}

int main(int argc, char** argv){
    int cards[10] = {adventurer, council_room, feast, gardens, outpost,
        remodel, smithy, village, baron, great_hall};
    
    struct gameState*game =newGame();
    int initialized = initializeGame(2,cards,42,game);
    if(initialized!=-1){
        int iterations = rand()%(game->handCount[whoseTurn(game)]);
        for(int i = 0; i < iterations; i++){
        int pos = rand()%iterations;
        testOutpost(pos,game);
        endTurn(game);
        }
    }
    return 0;
}